<template>
  <div class="create-group-wrap">
    <el-form ref="form" label-position="left" :model="form" label-width="120px">
      <div class="setp-1" v-if="$attrs.active == 0">
        <div class="form-wrap">
          <div class="step-form-card">
            <div class="card-title">二维码设置</div>
            <div class="card-content">
              <el-form-item label="活码名称：">
                <el-input v-model="form.name" placeholder="请输入活码名称" class="card-input" size="small" />
              </el-form-item>
              <el-form-item label="活码LOGO：">
                <el-upload v-model="form.imageUrl" class="create-avatar-uploader"
                  action="https://jsonplaceholder.typicode.com/posts/" :show-file-list="false"
                  :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
                  <img v-if="form.groupLogo" :src="form.imageUrl" class="avatar" />
                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                </el-upload>
                <div class="upload-tips">上传品牌LOGO，图片小于2M （选填）</div>
              </el-form-item>
            </div>
          </div>
        </div>
        <div class="form-wrap" style="margin-top: 10px;">
          <div class="step-form-card">
            <div class="card-title">分页组设置</div>
            <div class="card-content">
              <el-form-item label="分组页模版：">
                <el-radio-group v-model="form.mode">
                  <el-radio label="0">标准模式</el-radio>
                  <el-radio label="1">自定义底图</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="页面头图：">
                <el-upload v-model="form.imageUrl" class="create-avatar-uploader"
                  action="https://jsonplaceholder.typicode.com/posts/" :show-file-list="false"
                  :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
                  <img v-if="form.groupLogo" :src="form.imageUrl" class="avatar" />
                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                </el-upload>
                <div class="upload-tips">上传页面头图，图片小于2M （选填）</div>
              </el-form-item>
              <el-form-item label="主题颜色背景：">
                <div class="block">
                  <el-color-picker v-model="form.color"></el-color-picker>
                </div>
              </el-form-item>
              <el-form-item label="分组页面标题：">
                <el-input v-model="form.title" class="card-input" size="small" />
              </el-form-item>
              <el-form-item label="引导语：">
                <div class="text-editor">
                  <div class="editorheader flexbetween">
                    <EmojiPop @chooseEmoji='chooseEmoji' />
                    <div class="c_primary f-14 commhover" @click="handleCopy">复制</div>
                  </div>
                  <div class="pt-12">
                    <el-input v-model="text" id="messageInput" type="textarea" rows="4" class="w_full noborderinput"
                      placeholder="请输入文字" />
                  </div>
                </div>
              </el-form-item>
              <el-form-item label="群分组：">
                <div class="flex-rows" v-for="(item, index) in groupList" :key="index">
                  <el-input :value="item" class="card-input" size="small" />
                  <el-button class="delete-btn" size="small" plain @click.stop="onHandleDelete">
                    <i class="el-icon-delete delete-icon" />
                  </el-button>
                </div>
                <div class="flex-rows">
                  <el-button icon="el-icon-plus" plain size="small" @click.stop="onHandleCreate">
                    分组
                  </el-button>
                  <span class="create-group-tips">{{ groupList.length }}/50</span>
                </div>
              </el-form-item>
            </div>
          </div>
          <div class="preview-wrap">
            <div class="preview-title">分组预览</div>
            <div class="preview-mobile-content">
              <div class="mobile-nav-bar">
                <div class="nav-bar-title">标题</div>
              </div>
              <div class="phoneView" :style="{ background:form.color}">
                <div class="banner"><img src="@/assets/images/pxJzdy.png"/></div>
                 <div class="tips-list">
                   <div class="tips">XX小学管乐团寒假班开始招生啦！各位家长按孩子需要报名的乐器分别进群找老师报名缴费哦，报名截止时间2022年12月31日。</div>
                    <ul class="group-list">
                      <li>单簧管</li>
                      <li>萨克斯</li>
                      <li>圆号</li>
                    </ul>
                 </div>

              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="setp-2" v-if="$attrs.active == 1">
        <div class="form-wrap">
          <div class="step-form-card">
            <div class="card-content type">
              <div class="radio-center">
                <el-radio-group v-model="form.type">
                  <el-radio :label="0">统一设置所有分组</el-radio>
                  <el-radio :label="1">单独设置每个分组</el-radio>
                </el-radio-group>
              </div>
            </div>
          </div>
        </div>
        <div class="form-wrap" style="margin-top: 10px;">
          <div class="step-group" v-if="form.type==1">
            <div class="title">分组</div>
            <ul class="group-item">
              <li class="active">唱歌</li>
              <li>跳舞</li>
            </ul>
          </div>
          <div class="step-form-card">
            <div class="card-title">落地页设置</div>
            <div class="card-content">
              <el-form-item label="活动模式：">
                <el-radio-group v-model="form.mode">
                  <el-radio-button label="0" border>页面模式</el-radio-button>
                  <el-radio-button label="1" border>海报模式</el-radio-button>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="页面标题：">
                <el-input v-model="form.name" placeholder="请输入标题，必填" class="card-input" size="small" />
              </el-form-item>
              <div v-if="form.mode == 1">
                <el-form-item label="海报：">
                  <el-upload
                    v-model="form.imageUrl"
                    class="create-avatar-uploader"
                    action="https://jsonplaceholder.typicode.com/posts/"
                    :show-file-list="false"
                    :on-success="handleAvatarSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <img v-if="form.logo" :src="form.imageUrl" class="avatar" />
                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                  </el-upload>
                  <div class="upload-tips">
                    1. 图片大小不超过2M<br />
                    2.海报图设计的时候请预留好二维码的位置<br />
                    3.可自行拖动二维码的位置和大小<br />
                  </div>
                </el-form-item>
              </div>
              <div v-else>
                <el-form-item label="群名称：">
                  <el-checkbox v-model="form.checked">显示</el-checkbox>
                  <div>
                    <el-input
                      v-model="form.group_name"
                      placeholder="请输入群名称"
                      class="card-input"
                      size="small"
                    />
                  </div>
                  <div class="upload-cover-content">
                    <el-upload
                      v-model="form.imageUrl"
                      class="small-avatar-uploader"
                      action="https://jsonplaceholder.typicode.com/posts/"
                      :show-file-list="false"
                      :on-success="handleAvatarSuccess"
                      :before-upload="beforeAvatarUpload"
                    >
                      <img
                        v-if="form.imageUrl"
                        :src="form.imageUrl"
                        class="avatar"
                      />
                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                    </el-upload>
                    <div class="upload-tips">上传示例群头像图片，大小2M内</div>
                  </div>
                </el-form-item>
                <el-form-item label="二维码LOGO：">
                  <el-upload
                    v-model="form.imageUrl"
                    class="create-avatar-uploader"
                    action="https://jsonplaceholder.typicode.com/posts/"
                    :show-file-list="false"
                    :on-success="handleAvatarSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <img v-if="form.logo" :src="form.imageUrl" class="avatar" />
                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                  </el-upload>
                  <div class="upload-tips">上传品牌LOGO，图片小于2M</div>
                </el-form-item>
                <el-form-item label="辅助文案：">
                  <el-input
                    v-model="form.name"
                    placeholder="辅助文案"
                    class="card-input"
                    size="small"
                  />
                </el-form-item>
                <div class="mrore-setting-divider">
                  <div class="divider-inner-text" @click="onHandleTiggerMore()">
                    <div class="down-round-line">
                      <i
                        :class="[
                          'down-icon',
                          isMore ? 'el-icon-arrow-up' : 'el-icon-arrow-down',
                        ]"
                      />
                    </div>
                    <span class="more-text"
                      >{{ isMore ? "收起" : "展开" }}更多设置</span
                    >
                  </div>
                </div>
                <div
                  class="more-config"
                  :style="{ height: !isMore ? '0px' : '428px' }"
                >
                  <el-form-item label="客服二维码：">
                    <el-upload
                      v-model="form.imageUrl"
                      class="create-avatar-uploader"
                      action="https://jsonplaceholder.typicode.com/posts/"
                      :show-file-list="false"
                      :on-success="handleAvatarSuccess"
                      :before-upload="beforeAvatarUpload"
                    >
                      <img
                        v-if="form.logo"
                        :src="form.serviceLogo"
                        class="avatar"
                      />
                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                    </el-upload>
                    <div class="upload-tips">请上传客服二维码，图片小于2M</div>
                  </el-form-item>
                  <el-form-item label="活动方LOG：">
                    <el-upload
                      v-model="form.imageUrl"
                      class="create-avatar-uploader"
                      action="https://jsonplaceholder.typicode.com/posts/"
                      :show-file-list="false"
                      :on-success="handleAvatarSuccess"
                      :before-upload="beforeAvatarUpload"
                    >
                      <img v-if="form.logo" :src="form.imageUrl" class="avatar" />
                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                    </el-upload>
                    <div class="upload-tips">上传活动方LOGO，大小2M内</div>
                  </el-form-item>
                  <el-form-item label="活动方名称：">
                    <el-input
                      v-model="form.name"
                      placeholder="请输入"
                      class="card-input"
                      size="small"
                    />
                  </el-form-item>
                  <el-form-item label="描述：">
                    <el-input
                      v-model="form.name"
                      placeholder="请输入"
                      class="card-input"
                      size="small"
                    />
                  </el-form-item>
                </div>
              </div>
            </div>
          </div>
          <div class="preview-wrap">
            <div class="preview-title">扫码页预览</div>
            <div class="preview-mobile-content">
              <div class="mobile-nav-bar">
                <div class="nav-bar-title">标题</div>
              </div>
              <div class="preview-content" v-if="form.mode==0">
                <div class="qrcode-box">
                  <div class="group-big">
                    <div class="group-img"><img src="https://cdn-qyb-hz.wxb.com/u/5424982/qyb/20240318/1add7dd7c8b1b4309432f879f6cd28b2.jpg"/></div>
                    <div class="group-name">群名称</div>
                  </div>
                  <div class="qrcode">
                    <img class="cover"
                      src="https://cdn-qyb-hz.wxb.com/u/5424982/qyb/20240318/1add7dd7c8b1b4309432f879f6cd28b2.jpg" />
                  </div>
                  <div class="auxiliaryText">这是辅助文字,这是辅助文字</div>
                  <div class="bottom-text">若无法识别可截屏保存后添加</div>
                </div>
              </div>
              <div class="code-tips" v-if="form.mode==0">注：此处的二维码只是预览效果，切勿直接使用</div>
                <div class="preview-content" style="height: 640px; padding: 0; position: relative; width:356px;" v-if="form.mode==1">
                  <vue-drag-resize
                    :isActive="true"
                    :w="200"
                    :h="200"
                    :parentLimitation="true"
                    :aspectRatio="true"
                    @resizing="resize"
                    @dragging="resize"
                  >
                    <div class="code">二维码</div>
                  </vue-drag-resize>
                </div>

            </div>
          </div>
        </div>
      </div>
      <div class="setp-3" v-if="$attrs.active == 2">
        <div class="form-wrap">
          <div class="step-group">
            <div class="title">分组</div>
            <ul class="group-item">
              <li class="active">唱歌</li>
              <li>跳舞</li>
            </ul>
          </div>
          <div class="step-form-card">
            <div class="card-title">群规则设置</div>
            <div class="card-content">
              <div class="card-column-item">
                <div class="head-top-content">
                  <span class="title">手动选择群</span>
                </div>
                <el-form-item label="选择现有群：">
                  <el-button icon="el-icon-plus" plain size="small" @click="getBlackByGroup"
                    >客户群</el-button
                  >
                </el-form-item>
              </div>
              <div class="card-column-item">
                <div class="head-top-content">
                  <el-checkbox />
                  <span class="title" style="margin-left: 8px">自动建新群</span>
                </div>
                <el-form-item label="建群号：">
                  <el-button icon="el-icon-plus" plain size="small">企微号</el-button>
                  <ul class="userBig">
                    <li>
                      <div class="li-left">
                        <span>建群号1:</span><img src="@/assets/images/profile.jpg"/>
                      </div>
                      <div class="li-right">
                        <div class="title">新建群固定成员：</div>
                        <div class="group-btn">
                          <el-button size="small" @click="getAddBlackByUser"><i class="el-icon-plus"></i>选择客户</el-button>
                          <el-button size="small" @click="getChooseCompanyUser"><i class="el-icon-plus"></i>选择企业成员</el-button>
                          <div class="group-number">已选：<span>1</span>可选（39）</div>
                        </div>
                        <div class="user-list">
                          <h4>已选客户：</h4>
                          <img src="@/assets/images/profile.jpg"/>
                          <img src="@/assets/images/profile.jpg"/>
                        </div>
                        <div class="user-list">
                          <h4>已选成员：</h4>
                          <img src="@/assets/images/profile.jpg"/>
                          <img src="@/assets/images/profile.jpg"/>
                        </div>
                      </div>
                    </li>
                    <li>
                      <div class="li-left">
                        <span>建群号2:</span><img src="@/assets/images/profile.jpg"/>
                      </div>
                      <div class="li-right">
                        <div class="title">新建群固定成员：</div>
                        <div class="group-btn">
                          <el-button size="small"><i class="el-icon-plus"></i>选择客户</el-button>
                          <el-button size="small"><i class="el-icon-plus"></i>选择企业成员</el-button>
                          <div class="group-number">已选：<span>1</span>可选（39）</div>
                        </div>
                        <div class="user-list">
                          <h4>已选客户：</h4>
                          <img src="@/assets/images/profile.jpg"/>
                          <img src="@/assets/images/profile.jpg"/>
                        </div>
                        <div class="user-list">
                          <h4>已选成员：</h4>
                          <img src="@/assets/images/profile.jpg"/>
                          <img src="@/assets/images/profile.jpg"/>
                        </div>
                      </div>
                    </li>

                  </ul>
                </el-form-item>
                <el-form-item label="群名规则：">
                  <div class="editor-wrap">
                    <div class="editor-toolbar">
                      <div class="btn-num">编号</div>
                      <div class="start-num">
                        编号从<el-input
                          size="small"
                          style="width: 58px; margin: 0 4px"
                        />开始
                      </div>
                    </div>
                    <div class="editor-content">
                      <quill-editor
                        :options="editorOption"
                        style="min-height: 100px"
                        v-model="content"
                      />
                    </div>
                  </div>
                </el-form-item>
                <el-form-item label="触发建群：">
                  <div>
                    当可分配群少于<el-input
                      style="width: 88px; margin: 0 8px"
                      size="small"
                    />个时，开始建群
                  </div>
                </el-form-item>
                <el-form-item label="自动打群标签：">
                  <el-checkbox v-mode="form.close">已关闭</el-checkbox>
                </el-form-item>
              </div>
              <div class="card-column-item">
                <div class="head-top-content">
                  <span class="title">群规则</span>
                </div>
                <el-form-item>
                  <div slot="label">
                    群成员上限
                    <el-tooltip
                      style="margin-left: 4px; color: #666"
                      effect="dark"
                      placement="top"
                    >
                      <div slot="content">
                        超出200人的群不能扫码加入，扫码页<br />不会展示
                      </div>
                      <svg-icon icon-class="iquestion" /> </el-tooltip
                    >：
                  </div>
                  <el-input style="width: 98px" />
                </el-form-item>
                <el-form-item>
                  <div slot="label">
                    群展示顺序
                    <el-tooltip
                      style="margin-left: 4px; color: #666"
                      effect="dark"
                      placement="top"
                    >
                      <div slot="content">
                        有多个企微号（需登录企微宝云端<br />版）在同一个群内时，每个号都会获<br />取该群的群二维码，进行随机展示，<br />即由多个邀请者邀请入群，避免单个<br />号拉人过于频繁。
                      </div>
                      <svg-icon icon-class="iquestion" /> </el-tooltip
                    >：
                  </div>
                  <el-radio-group v-model="form.radio">
                    <el-radio :label="0">所有群轮流展示</el-radio>
                    <el-radio :label="1">群满员后，展示下一个群</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item>
                  <div slot="label">
                    群展示顺序
                    <el-tooltip
                      style="margin-left: 4px; color: #666"
                      effect="dark"
                      placement="top"
                    >
                      <div slot="content">
                        有多个企微号（需登录企微宝云端<br />版）在同一个群内时，每个号都会获<br />取该群的群二维码，进行随机展示，<br />即由多个邀请者邀请入群，避免单个<br />号拉人过于频繁。
                      </div>
                      <svg-icon icon-class="iquestion" /> </el-tooltip
                    >：
                  </div>
                  <el-checkbox v-mode="form.isOpen">已开启</el-checkbox>
                </el-form-item>
              </div>
            </div>
          </div>
        </div>
      </div>
    </el-form>
    <!--    从客户群添加-->
    <addBlackByGroup v-if="showAddBlackByGroup" :visableIf.sync="showAddBlackByGroup"></addBlackByGroup>
    <!--    添加客户-->
    <addBlackByUser v-if="showAddBlackByUser" :visableIf.sync="showAddBlackByUser"></addBlackByUser>
    <!--    从企业成员添加-->
    <chooseCompanyUser v-if="showChooseCompanyUser" :visableIf.sync="showChooseCompanyUser"></chooseCompanyUser>
  </div>
</template>
<script>
import { quillEditor } from "vue-quill-editor";
import EmojiPop from '@/components/EmojiPop';
import Vue from 'vue'
import VueDragResize from 'vue-drag-resize'
Vue.component('vue-drag-resize', VueDragResize)
export default {
  data() {
    return {
      showAddBlackByGroup: false,
      showAddBlackByUser: false,
      showChooseCompanyUser:false,
      stepList: ["基本设置", "扫码页设置", "群和规则设置"],
      isMore: false,
      backgroundColor:'#3a2a8c',
      text:'',
      form: {
        mode: 0,
        type:0,
        imageUrl:
          "https://cdn.llxzl.com/goods/user/4/20200908/e39d825369deb1e717c789cd8bc5ea60.jpg",
        color: '#3a2a8c',
        title: 'XX小学管乐团寒假班招生'
      },
      isMousedown: false,
      content: null,
      groupList: ['单簧管', '萨克斯','圆号','长笛'],
      editorOption: {
        modules: {
          // 隐藏工具栏
          toolbar: false,
        },
        placeholder: "请输入内容",
      },
    };
  },
  components: {
    quillEditor,
    EmojiPop,
    addBlackByGroup: () => import('./addBlackByGroup.vue'),
    addBlackByUser: () => import('./addBlackByUser.vue'),
    chooseCompanyUser:()=>import('./chooseCompanyUser.vue'),
  },
  watch:{

  },
  methods: {
    // 拖拽时可以确定元素位置
    resize(newRect) {
      this.width = newRect.width;
      this.height = newRect.height;
      this.top = newRect.top;
      this.left = newRect.left;
    },
    getBlackByGroup() {
      this.showAddBlackByGroup = true;
    },
    getChooseCompanyUser(){
      this.showChooseCompanyUser=true;
    },
    getAddBlackByUser() {
      this.showAddBlackByUser = true;
    },
    handleAvatarSuccess(res, file) {
      this.form.imageUrl = URL.createObjectURL(file.raw);
    },
    beforeAvatarUpload(file) {
      const isJPG = file.type === "image/jpeg";
      const isLt2M = file.size / 1024 / 1024 < 2;

      if (!isJPG) {
        this.$message.error("上传头像图片只能是 JPG 格式!");
      }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
      }
      return isJPG && isLt2M;
    },
    onHandleTiggerMore() {
      this.isMore = !this.isMore;
    },
    handleCopy(){
        this.copy(this.text)
    },
    //选择表情包
    chooseEmoji(icon){
        var elInput=document.getElementById("messageInput");
        var startPos=elInput.selectionStart;
        var endPos=elInput.selectionEnd;
        var text=elInput.value;
        if(startPos ===undefined ||endPos ===undefined){
            return;
        }
        var result=text.substring(0,startPos) + icon.name + text.substring(endPos);
        //重新定义光标位置
        elInput.focus();
        elInput.selectionStart=startPos+icon.name.length;
        elInput.selectionEnd=startPos +icon.name.length;
        elInput.value=result;
        this.text=result;
    },
    onHandleCreate() {
      if(this.groupList.length <= 50) {
        this.groupList.push('')
      }
    },
    onHandleDelete() {
      this.groupList.pop()
    },
  },
};
</script>
<style lang="scss" scoped>
.create-group-wrap {
  padding: 16px 16px 76px;
  .form-wrap {
    display: flex;
    padding: 0 80px;
    .step-form-card {
      display: inline-block;
      flex: 1 1;
      text-align: left;
      text-align: initial;
      color: rgba(0, 0, 0, 0.85);
      border-radius: 4px;
      background: #fff;
      font-size: 14px;
      .card-title {
        padding: 16px;
        font-weight: 600;
        color: rgba(0, 0, 0, 0.85);
      }
      .card-content {
        border-top: 1px solid #f5f5f5;
        padding: 24px;
        &.type {
          padding: 10px;
        }
        .card-input {
          width: 400px;
        }
        .upload-cover-content {
          margin-top: 8px;
          .small-avatar-uploader {
            width: 102px;
            height: 102px;
            .avatar {
              width: 102px;
              height: 102px;
            }
          }
          .upload-tips {
            margin-top: 8px;
            font-size: 14px;
            line-height: 22px;
            color: rgba(0, 0, 0, 0.45);
          }
        }
        .mrore-setting-divider {
          color: rgba(0, 0, 0, 0.65);
          font-weight: 400;
          font-size: 14px;
          display: flex;
          margin: 16px 0;
          white-space: nowrap;
          text-align: center;
          border-top: 0;
          border-top-color: rgba(0, 0, 0, 0.06);
          &::before {
            position: relative;
            top: 50%;
            width: 50%;
            border-top: 1px solid transparent;
            border-top-color: inherit;
            border-bottom: 0;
            transform: translateY(50%);
            content: "";
          }
          &::after {
            position: relative;
            top: 50%;
            width: 50%;
            border-top: 1px solid transparent;
            border-top-color: inherit;
            border-bottom: 0;
            transform: translateY(50%);
            content: "";
          }
          .divider-inner-text {
            padding: 0 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            .down-round-line {
              width: 14px;
              height: 14px;
              display: flex;
              align-items: center;
              justify-content: center;
              border-radius: 50%;
              border: 1px solid rgba(0, 0, 0, 0.65);
              .down-icon {
                font-size: 10px;
              }
            }
            .more-text {
              margin-left: 8px;
            }
          }
        }
        .more-config {
          height: 428px;
          overflow: hidden;
          transition: height 0.3s;
        }
        .card-column-item {
          position: relative;
          margin-bottom: 20px;
          &::before {
            content: "";
            width: 3px;
            height: 14px;
            display: block;
            background: #3070ff;
            position: absolute;
            top: 13px;
            left: 0;
          }
          .head-top-content {
            margin-bottom: 20px;
            padding: 9px 12px;
            background: #f5f5f5;
            border-radius: 4px;
            font-size: 16px;
            font-family: PingFangSC-Semibold, PingFang SC;
            font-weight: 600;
            color: rgba(0, 0, 0, 0.85);
          }
        }
        .radio-center {
          display: flex;
          align-items: center;
          justify-content: center;
          .radio-item {
            padding: 6px 16px;
            margin: 0 32px;
            display: inline-block;
            font-size: 14px;
            line-height: 24px;
            &.checked {
              background: #f3f3f3;
              border-radius: 6px;
            }
          }
        }
      }
      .flex-rows {
        display: flex;
        align-items: center;
        &:not(:first-child) {
          margin-top: 8px;
        }
        .delete-btn {
          width: 32px;
          height: 32px;
          margin-left: 4px;
          display: flex;
          align-items: center;
          justify-content: center;
        }
        .create-group-tips {
          font-size: 14px;
          line-height: 32px;
          margin-left: 8px;
          color: rgba(0, 0, 0, 0.45);
        }
      }
    }
    .create-avatar-uploader {
      .avatar-uploader-icon {
        font-size: 28px;
        color: #8c939d;
        width: 104px;
        height: 104px;
        line-height: 104px;
        text-align: center;
      }
      .avatar {
        width: 104px;
        height: 104px;
        display: block;
      }
    }
    .upload-tips {
      font-size: 14px;
      line-height: 22px;
      color: rgba(0, 0, 0, 0.45);
    }
    .preview-wrap {
      width: 388px;
      background: #fff;
      border-radius: 0 4px 4px 0;
      padding: 16px;
      border-left: 1px solid #ececec;
      .preview-title {
        font-size: 14px;
        font-weight: 600;
        color: rgba(0, 0, 0, 0.85);
      }
      .preview-mobile-content {
        margin-bottom: 16px;
        border-radius: 6px;
        overflow: hidden;
        text-align: center;
        position: relative;

        .mobile-nav-bar {
          height: 70px;
          background: url("../../../../../assets/images/pic_mobile_head_bar.png") no-repeat 50% / cover;

          .nav-bar-title {
            padding: 40px 60px 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: rgba(0, 0, 0, 0.65);
            font-size: 14px;
            font-weight: 500px;
            line-height: 22px;
          }
        }

        .preview-content {
          padding: 20px;
          background: #f4f6fe;

          .qrcode-box {
            background: #fff;
            box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.05);
            border-radius: 6px;
            padding: 20px 20px 32px;
            position: relative;

            .group-big {
              position: absolute;
              left: 20px;
              top: 20px;
              display: flex;
              align-items: center;
              justify-content: center;

              .group-img {
                width: 40px;
                height: 40px;
                border-radius: 4px;

                img {
                  width: 40px;
                  height: 40px;
                  border-radius: 4px;
                  margin-right: 10px;
                }
              }

              .group-name {
                font-weight: bold;
                font-size: 14px;
                margin-left: 10px;
              }
            }

            .qrcode {
              width: 200px;
              height: 200px;
              margin-top: 80px;
              margin-left: auto;
              margin-right: auto;
              background: url("../../../../../assets/images/pic_mobile_qrcode.png") no-repeat 50% / cover;
              display: flex;
              align-items: center;
              justify-content: center;

              .cover {
                width: 42px;
                height: 42px;
                background: #fff;
                border-radius: 4px;
              }
            }
          }

          .auxiliaryText {
            color: rgba(0, 0, 0, 0.45);
            font-size: 14px;
            margin-top: 20px;
            margin-bottom: 2px;
          }

          .bottom-text {

            color: rgba(0, 0, 0, 0.45);
            font-size: 14px;
            line-height: 22px;
          }
        }

        .preview-content-drag-mode {
          background-color: #f4f6fe;
          background-repeat: no-repeat;
          background-size: 100%;
          height: calc(100vh - 370px);
          position: relative;

          .drag-box {
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #fff;
            border: 1px dashed #e9e9e9;
            height: 81px;
            width: 81px;
            cursor: move;
            position: absolute;
            top: 0px;
            left: 0px;
          }
        }
      }
      .prewiew-tips {
        font-size: 14px;
        color: rgba(0, 0, 0, 0.45);
        font-weight: 400;
        text-align: center;
      }
    }
  }
  .text-editor {
    position: relative;
    border: 1px solid #e9e9e9;
    border-radius: 2px;
    width: 398px;
  }
  .editorheader {
    padding: 8px 18px;
    border-bottom: 1px solid #e9e9e9;
    background: #f9f9f9;
  }
  .editicon {
    width: 24px;
    height: 24px;
  }
  .emojibox {
    width: 100%;
    height: 366px;
    padding: 10px;
    overflow-y: scroll;
    background-color: white;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-top: -15px;
    margin-left: -15px;
  }
  .iconbox {
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    margin: 1px;
    border-radius: 4px;
    &:hover {
      background-color: #eee;
    }
    img {
      width: 28px;
      height: 28px;
    }
  }
}
.editor-wrap {
  width: 400px;
  border: 1px solid #ececec;
  .editor-toolbar {
    padding: 8px;
    font-size: 14px;
    line-height: 22px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .btn-num {
      background: #fff;
      border: 1px solid #e9e9e9;
      padding: 3px 8px;
      cursor: pointer;
      margin: 0;
      border-radius: 2px;
      color: #666;
    }
  }
  ::v-deep .editor-content .ql-snow {
    border: none;
  }
}
.code-tips {
  margin-top:20px;
  font-size: 14px;
  color: #8C8C8C;
  display: flex;
  align-items: center;
}
.step-group {
width: 160px;
  display: flex;
  background: #fff;
  margin-right: 10px;
  flex-wrap: wrap;
  flex-direction: column;
  padding: 15px;
  .title {
    color:#8C8C8C ;
  }
  .group-item {
    margin-top: 10px;
    li{
      height: 30px;
      display: flex;
      margin-bottom: 8px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      padding: 5px 8px;
      color: rgba(0, 0, 0, .85);
      border-radius: 4px;
      cursor: pointer;
      &.active{
        background: #ebf2ff;
      }
    }
  }
}
.userBig {
  border: 1px solid #eee;
  margin-top: 10px;

  li {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    border-radius: 4px;
    padding: 0 12px;
    color: rgba(0, 0, 0, .65);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;

    .li-left {
      display: flex;
      width: 120px;
      padding-top: 16px;

      span {
        margin-right: 10px;
      }

      img {
        width: 32px;
        height: 32px;
        border-radius: 4px;
      }
    }

    .li-right {
      border-left: 1px solid #eee;
      padding-left: 15px;
      margin-left: 15px;

      .group-btn {
        display: flex;
        height: 32px;
        margin-bottom: 10px;

        .group-number {
          margin-left: 10px;
        }
      }

      .user-list {
        display: flex;
        height: 50px;
        display: flex;
        align-items: center;
        border: 1px solid #eee;
        padding: 10px;
        border-radius: 4px;
        margin-bottom: 10px;

        h4 {
          font-weight: 400;
          margin: 0px;
        }

        img {
          width: 32px;
          height: 32px;
          border-radius: 4px;
          margin-right: 10px;
        }


      }
    }
  }
}.phoneView {
.banner{
  img {
    width: 100%;
    height: auto;
  }
}
  .tips-list {
     margin-top: 10px;
    .tips {
      padding: 12px;
      border-radius: 6px;
      box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .05);
      background: #fff;
      border-top: 2.5px solid #3070ff;
      text-align: left;
      color: rgba(0, 0, 0, .65);
      margin: 0px 10px;
      margin-bottom: 12px;
    }
    .group-list {
      display: flex;
      flex-wrap: wrap;
      margin: 0px 5px;
      li {
        font-size: 16px;
        color: rgba(0, 0, 0, .85);
        padding: 13px 18px;
        text-align: left;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        background: #fff;
        box-shadow: 0 3px 6px 0 rgba(0, 0, 0, .05);
        border-radius: 6px;
        border: none;
        width:calc(50% - 10px);
        margin: 0px 5px;
        margin-bottom: 5px;
      }
    }
  }
 }
::v-deep .vdr {
  background: #fff;
  align-items: center;
  justify-content: center;
  .code {
    font-size: 12px;
    color: #888;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
  }
}
</style>
